'use strict';

const Service = require('egg').Service;

class WebErrorService extends Service {
  async list() {
    const { LogWebError } = this.ctx.model;
    return await LogWebError.listData(this.ctx.query);
  }

  async count() {
    const { LogWebError } = this.ctx.model;
    return await LogWebError.getCount(this.ctx.query);
  }

  async destroy() {
    const { LogWebError } = this.ctx.model;
    return LogWebError.removeModel(this.ctx.params.id);
  }
}

module.exports = WebErrorService;
